// 通知推送模块相关的TypeScript类型定义

/**
 * 通知信息
 */
export interface Notification {
  id: number
  type: 'COURSE' | 'CARD' | 'SYSTEM' | 'OTHER'
  channel: 'INTERNAL' | 'SMS' | 'EMAIL' | 'PUSH'
  title: string
  content: string
  link?: string
  isRead: boolean
  createdAt: string
  readAt?: string
}

/**
 * 通知列表响应数据
 */
export interface NotificationListResponse {
  list: Notification[]
  total: number
  unreadCount: number
  page: number
  pageSize: number
}

/**
 * 未读通知数量响应数据
 */
export interface UnreadCountResponse {
  total: number
  byType: {
    COURSE: number
    CARD: number
    SYSTEM: number
  }
}

/**
 * 公告信息
 */
export interface Announcement {
  id: number
  title: string
  content: string
  type: 'NOTICE' | 'EVENT' | 'MAINTENANCE' | 'PROMOTION'
  priority: 'LOW' | 'NORMAL' | 'HIGH' | 'URGENT'
  isTop: boolean
  coverImage?: string
  viewCount: number
  publishAt?: string
  expireAt?: string
  createdAt: string
}

/**
 * 公告列表响应数据
 */
export interface AnnouncementListResponse {
  list: Announcement[]
  total: number
  page: number
  pageSize: number
}

/**
 * 创建公告请求参数
 */
export interface CreateAnnouncementRequest {
  title: string
  content: string
  type: 'NOTICE' | 'EVENT' | 'MAINTENANCE' | 'PROMOTION'
  priority: 'LOW' | 'NORMAL' | 'HIGH' | 'URGENT'
  targetUsers: 'ALL' | 'MEMBERS' | 'COACHES' | 'CUSTOM'
  coverImage?: string
  publishAt?: string
  expireAt?: string
  isTop?: boolean
}

/**
 * 更新公告请求参数
 */
export interface UpdateAnnouncementRequest {
  title?: string
  content?: string
  type?: 'NOTICE' | 'EVENT' | 'MAINTENANCE' | 'PROMOTION'
  priority?: 'LOW' | 'NORMAL' | 'HIGH' | 'URGENT'
  targetUsers?: 'ALL' | 'MEMBERS' | 'COACHES' | 'CUSTOM'
  coverImage?: string
  publishAt?: string
  expireAt?: string
  isTop?: boolean
}

/**
 * 通知模板信息
 */
export interface NotificationTemplate {
  id: number
  code: string
  name: string
  type: 'COURSE' | 'CARD' | 'SYSTEM' | 'OTHER'
  channel: 'INTERNAL' | 'SMS' | 'EMAIL' | 'PUSH' | 'ALL'
  title: string
  content: string
  variables: string[]
  isActive: boolean
}

/**
 * 通知模板列表响应数据
 */
export interface TemplateListResponse {
  list: NotificationTemplate[]
  total: number
}

/**
 * 创建通知模板请求参数
 */
export interface CreateTemplateRequest {
  code: string
  name: string
  type: 'COURSE' | 'CARD' | 'SYSTEM' | 'OTHER'
  channel: 'INTERNAL' | 'SMS' | 'EMAIL' | 'PUSH' | 'ALL'
  title: string
  content: string
  variables: string[]
}

/**
 * 更新通知模板请求参数
 */
export interface UpdateTemplateRequest {
  code?: string
  name?: string
  type?: 'COURSE' | 'CARD' | 'SYSTEM' | 'OTHER'
  channel?: 'INTERNAL' | 'SMS' | 'EMAIL' | 'PUSH' | 'ALL'
  title?: string
  content?: string
  variables?: string[]
  isActive?: boolean
}

/**
 * 通知设置信息
 */
export interface NotificationSetting {
  channel: 'INTERNAL' | 'SMS' | 'EMAIL' | 'PUSH'
  type: 'COURSE' | 'CARD' | 'SYSTEM' | 'OTHER'
  isEnabled: boolean
}

/**
 * 更新通知设置请求参数
 */
export interface UpdateSettingsRequest {
  settings: NotificationSetting[]
}
